package action;

import java.util.LinkedHashMap;

public abstract class ActionResponse {
	
	private final LinkedHashMap<String, Object> hash;
	
	public ActionResponse(){
		this.hash = new LinkedHashMap<String, Object>();
	}
	
	public ActionResponse(String key, Object object){
		LinkedHashMap<String, Object> hash = new LinkedHashMap<String, Object>();
		hash.put(key, object);
		this.hash = hash;
	}
	
	public ActionResponse(LinkedHashMap<String, Object> hash){
		this.hash = hash;
	}
	
	public LinkedHashMap<String, Object> getHash() {
		return hash;
	}

	public abstract void update(float elapsedTime);
	public abstract void finished();
	
	public static ActionResponse defaut()
	{
		return new ActionResponse() {

			@Override
			public void update(float elapsedTime) {
				// Does Nothing
			}

			@Override
			public void finished() {
				// Does Nothing
			}
			
		};
	}
}
